form validation using pattern attribute